<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript" src="${jspath}/js/tinymce/tinymce.min.js"></script>

 <!-- 我的班级  里面 班级答疑，   里面的  等待答疑   -->
	<div class="not_right" >
		<div class="not_righttitle">
			<div class="not_righttitle01">
				 班级答疑</div>
			<div class="not_righttb">
				 
				<div class="exam_title"> 
					<a href="javascript:getSudentTabContent('question', 'ofquest', 'course');">
						<c:choose>
						<c:when test="${null==tabstatus}">
							<c:set value="1" var="tabstatus" scope="page" />
						</c:when>
						</c:choose>
						<c:choose>
							<c:when test="${tabstatus=='1'}">
								<div class="exam_title01"> 待回复问题 </div>
							</c:when>  
							<c:otherwise>
						        <div class="exam_title02"> 待回复问题 </div>        	 
						    </c:otherwise> 
					    </c:choose>
					</a> 
					<a href="javascript:getSudentTabContent('question', 'ofquested', 'course');">
						 <c:choose>
							<c:when test="${tabstatus=='2'}">
								<div class="exam_title01"> 已回复问题 </div>
							</c:when>  
							<c:otherwise>
						        <div class="exam_title02"> 已回复问题 </div>        	 
						    </c:otherwise>
					    </c:choose>
					</a>
					
					<!--  不是 课程页面进入的话显示所有 -->
					<c:choose>
					<c:when test="${null==classId}">
	               		<a href="javascript:getSudentTabContent('question', 'ofhot', 'course');">
		               		<c:choose>
								<c:when test="${tabstatus=='3'}">
									<div class="exam_title01">热门问题  </div>
								</c:when>  
								<c:otherwise>
							        <div class="exam_title02">热门问题 </div>        	 
							    </c:otherwise>
						    </c:choose>
						</a>						
						<a href="javascript:getSudentTabContent('question', 'ofquestall', 'course');">
								 <c:choose>
									<c:when test="${tabstatus=='4'}">
										<div class="exam_title01">全部问题  </div>
									</c:when>  
									<c:otherwise>
								        <div class="exam_title02">全部问题</div>        	 
								    </c:otherwise>
							    </c:choose>
						</a>  
	               	</c:when>
	               </c:choose>
	                <a target="_blank" href="/student/question/questionAdd">
					<div class="exam_title02" style="float:right;">
						<div class="add_img"><img src="/images/add0.png"/> </div>
						我要提问</div>
					</a>
				</div>
				
				
				<!-- 
				<div class="exam_select">
					<select  class="selectBox" name="course" id="course">
						<option value="-1">所属课程（不限）</option>
						<c:forEach items="${courseList}" var="course">
						<c:if test="${course.courseId == selectedCourseId}">
						<option selected="selected" value="${course.courseId}">${course.courseNm }</option>
						</c:if>
						<c:if test="${course.courseId != selectedCourseId}">
						<option value="${course.courseId}">${course.courseNm }</option>
						</c:if>
						
						</c:forEach>
					</select>
					<c:choose>
						<c:when test="${tabstatus=='1'}">
							<c:set scope="page" var="searchMethod" value="getSudentTabContent('question', 'ofquest', 'course', null, 1);" />
							<c:set scope="page" var="searchType" value="ofquest" />
						</c:when>
						<c:when test="${tabstatus=='2'}">
							<c:set scope="page" var="searchMethod" value="getSudentTabContent('question', 'ofquested', 'course', null, 1);" />
							<c:set scope="page" var="searchType" value="ofquested" />
						</c:when>
						<c:when test="${tabstatus=='3'}">
							<c:set scope="page" var="searchMethod" value="getSudentTabContent('question', 'ofhot', 'course', null, 1);" />
							<c:set scope="page" var="searchType" value="ofhot" />
						</c:when>
						<c:when test="${tabstatus=='4'}">
							<c:set scope="page" var="searchMethod" value="getSudentTabContent('question', 'ofquestall', 'course', null, 1);" />
							<c:set scope="page" var="searchType" value="ofquestall" />
						</c:when>  
						<c:otherwise>
							<c:set scope="page" var="searchMethod" value="#" />
							<c:set scope="page" var="searchType" value="ofquest" />
					    </c:otherwise>
				    </c:choose>
					<div class="exam_selectbutt"><a href="javascript:${searchMethod}">查&nbsp;&nbsp;询 </a></div>
				</div>
					 -->
				<c:forEach items="${pageData.data}" var="questionObject">
				<div class="exam_content">
					<div class="quest_listimg">
					<!-- 
					<c:choose><c:when test="${null != questionObject.userIcon}"><img src="${questionObject.userIcon}"></c:when>
					<c:otherwise><img src="../images/kczx_son/user02.jpg"></c:otherwise>
					</c:choose>
 					-->
					<img src="${iconpath}/cdrmimg/${questionObject.coursePimg}?w=45&h=45" />
					</div>
					<div class="exam_contlist">
						<div class="exam_contlistl"> 
							<a href="javascript: showQuestionDetail('question', '${currentTab}', '${questionObject.quizId}', '${selectedCourseId}')">
								<div class="exam_contlistl01">${questionObject.content } </div>
							</a>
							<div class="exam_contlistl02">所属课程：
						 	<c:if test="${questionObject.courseName == null}">
						 		<a href="#" style="color:#0A8CD2">-</a>
						 	</c:if>
						 	<c:if test="${questionObject.courseName != null}">
						 		<a target="_blank" href="http://www.zhuclass.com/course/detail/${questionObject.courseId}" style="color:#0A8CD2">${questionObject.courseName}</a> 
							</c:if>
							<a href="javascript: void(0)">
								<span style="margin-left:10px;color:#2F6383;">${questionObject.userName } </span>
							</a> 
							
							提问于:${questionObject.createDate}
						
									<span style="margin-left:10px;color:#999"> 浏览（${questionObject.viewCnt }）</span>
							</div>
						</div>
						<div class="quest_contlistr">
							<div class="quest_contlistr01">
								<div class="quest_contlistr02"> ${questionObject.answerCnt } </div>
								<a href="javascript: showQuestionDetail('question', '${currentTab}', '${questionObject.quizId}', '${selectedCourseId}')">
								回复 </a></div>
						</div>
					</div>
				</div>
				</c:forEach>
			</div>
		</div>
<c:choose>
	<c:when test="${tabstatus=='3'}">
		<%-- no paging on hot question list --%>
	</c:when>  
	<c:otherwise>
        <script type="text/javascript">
			// 初始化点击分页按钮的方法	  
			onPageClickFunction = function(pageNumber, event) {
				var pdata = {};
				pdata.type = '';
				if (pageNumber) {
					pdata.pageNo = pageNumber;
				}
				getSudentTabContent('question', '${searchType}', 'course', null,
						pageNumber);
			};
		</script>
		<%@ include file="./paging.jsp"%>        	 
	</c:otherwise> 
</c:choose>
</div>
	 <!-- 我的班级  里面 班级答疑，   里面的  等待答疑   -->